﻿/// <reference path="underscore.js" />
/// <reference path="Student.js" />
(function () {
    var studentsArray = [
		new Student("Kiro", "Skalata", 7, [5, 6, 4, 5]),
		new Student("Ab", "Cto", 20, [6, 6, 6, 5]),
		new Student("Zya", "Ata", 25, [3, 6, 4, 2])
    ];

    function compareNames(students) {
        return _.filter(students, function (student) {
            return student.age > 18 && student.age < 24;
        });
    }

    var comparedStudents = compareNames(studentsArray);

    console.log("Students with age between 18 and 24: ");
    console.log(comparedStudents.toString());
})();